package ast;

import mem.interfaces.IMem;
import environnement.interfaces.IEnv;
import ast.interfaces.IAST;
import ast.interfaces.IASTexp;

public class ASTexp implements IASTexp{

	public IAST exp;
	
	public ASTexp(IAST exp){
		this.exp = exp;
	}

	@Override
	public Object eval(IAST ast, IEnv e, IMem m) {
		return getExp().eval(ast, e, m);
	}

	@Override
	public String toTreeString(String ident,IEnv env,IMem mem) {
		return "("+ getExp().toTreeString(ident, env, mem) +")";
	}

	public IAST getExp() {
		return exp;
	}

	public void setExp(IAST exp) {
		this.exp = exp;
	}
	
}
